<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
		
	</style>

</head>
<body>
	<script type="text/javascript">
		var name     = prompt("姓名");
		var sex      = prompt("性别");
		var password = prompt("密码");
		var age      = prompt("年龄");
		var ageGrade ;
		if( age < 18 ){
			ageGrade = "未成年";
		}else if(age < 30){
			ageGrade = "成年且壮年";
		}else{
			ageGrade = "老年人哈哈哈";
		}
		var allData = "姓名:" + name + "<br>" +"性别:" + sex +  "<br>" + "密码:" + password + "<br>" + "年龄:" + age + "<br>" + "年龄层次:" + ageGrade + "<br>";
		document.write(allData);
	</script>
</body>
</html>